import request from '@/utils/request'

export function apiGetCenterDateRestriction (parameter) {
  return request({
    url: '/boss/project/dashboard/dashboard/getMinAndMaxTime',
    method: 'get',
    params: parameter
  })
}


export function apiGetResearchCenterList (parameter) {
  return request({
    url: '/boss/project/dashboard/dashboard/groupByResearchAndCountTotalAmount',
    method: 'get',
    params: parameter
  })
}

export function apiGetCenterDashboardData (parameter) {
  return request({
    url: '/boss/project/dashboard/dashboard/groupByTime',
    method: 'get',
    params: parameter
  })
}

export function apiGetExpenseDetailData (parameter) {
  return request({
    url: '/boss/project/dashboard/dashboard/detailForDashBoard',
    method: 'get',
    params: parameter
  })
}

// 访视阶段下拉
export function listVisitStage (parameter) {
  return request({
    url: '/boss/project/dashboard/dashboard/listVisitStage',
    method: 'get',
    params: parameter
  })
}

// 费用科目下拉
export function listFeeCategory (parameter) {
  return request({
    url: '/boss/project/dashboard/dashboard/listFeeCategory',
    method: 'get',
    params: parameter
  })
}

// 项目角色与财务
export function listAndFinanceRole (parameter) {
  return request({
    url: '/boss/pro/role/listAndFinanceRole',
    method: 'post',
    data: parameter
  })
}

// 打包
export function pack (parameter) {
  return request({
    url: '/boss/finance/record/check',
    method: 'post',
    data: parameter
  })
}
// 检查状态
export function checkColor (parameter) {
  return request({
    url: '/boss/finance/record/checkColor',
    method: 'post',
    data: parameter
  })
}

// 下载
export function download (parameter) {
  return request({
    url: '/boss/finance/record/download',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}

// 删除
export function fileDelete (parameter) {
  return request({
    url: '/boss/finance/record/delete',
    method: 'post',
    data: parameter
  })
}
